﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TZReport_Model.DB;
using TZReport_Util.Basic;
using TZReport_Util.Log;
using TZReport_Util.Util;
using TZRerport_Dal.Basic;

namespace TZRerport_Dal.Dal
{
    public class TZ_Report_RecordDal : BaseDal<TZ_Report_Record>
    {
        private SqlHelper sqlHelper = new SqlHelper(ConfigManager.conn);
        private LogHelper logHelper = new LogHelper(typeof(TZ_Report_RecordDal));

        public bool InsReportRecord(List<TZ_Report_Record> list)
        {
            bool flag = true;
            if (list == null || list.Count == 0)
                return flag;

            string failMsg = string.Empty;
            flag = sqlHelper.InsBulkCopy(list, ref failMsg);
            if (!string.IsNullOrWhiteSpace(failMsg))
                logHelper.Error(failMsg);

            return flag;
        }

    }
}
